package bg.btanev.eightyfour.repository;

import java.util.Date;
import java.util.List;
import java.util.Set;

import bg.btanev.eightyfour.dao.PagingConfig;
import bg.btanev.eightyfour.domain.Tag;
import bg.btanev.eightyfour.domain.Target;
import bg.btanev.eightyfour.domain.person.Person;
import bg.btanev.eightyfour.domain.profile.Profile;
import bg.btanev.eightyfour.domain.profile.ProfileEvent;
import bg.btanev.eightyfour.domain.profile.feed.FeedProfile;
import bg.btanev.eightyfour.shared.state.ProfileType;

/**
 *
 * @author B.Tanev
 *
 */
public interface ProfileRepository {
	FeedProfile createAndStoreFeedProfile(String name, ProfileType type, Target target, String feedUrl);

	void storeProfile(Profile<ProfileEvent> profile);

	void removeProfile(Profile<ProfileEvent> profile);

	List<Profile<ProfileEvent>> findAllProfiles(Target target);

	List<Profile<ProfileEvent>> findAllProfiles(Person person);

	List<ProfileEvent> findProfileEventsForTarget(Target target, PagingConfig pagingConfig);

	List<ProfileEvent> findProfileEventsForTarget(Target target);

	List<ProfileEvent> findProfileEventsForTargetAndKeywork(Target target, String keyword);

	List<ProfileEvent> findProfileEventsForTargetAndTag(Target target, Tag tag);

	Profile<ProfileEvent> findByIdentifier(Long id);

	List<ProfileEvent> findProfileEventsForTarget(Target target, Date beginDate, Date endDate, ProfileType profileType,
			List<Tag> tags, Set<String> keywords);

	List<ProfileEvent> findProfileEventsForTarget(Target target, Date beginDate, Date endDate, ProfileType profileType,
			List<Tag> tags, Set<String> searchExpressions, PagingConfig pagingConfig);
}
